package com.qf.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 监听器     消费者1
 * 工作模式 的消息
 *
 * @author lixu
 */
@Component
@RabbitListener(queues = "demo_queue")//监听器  监听 队列的名称是queues = "demo_queue"
public class ReceiverWorkQueue1 {


    //监听到消息以后 进行自动接收

    @RabbitHandler
    public void receiverMessage(String msg){

        System.out.println("====消费者111111接收到的消息:" + msg);

    }

}
